package com.ra.brand;

import java.io.File;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import com.googlecode.cswish.annotation.cm;

/**
 * 品牌公寓宣传条
 * 
 * @author colin
 * 
 */
@Entity
public class BrandApartmentBanner {

	private Integer id;

	// transient
	private File banner;

	// transient
	private String bannerContentType;

	@cm("Banner图片路径")
	private String bannerFileName;
	
	/** 1：手机图片；2：web图片*/
	@cm("图片类别")
	private Integer type;

	@cm("品牌房屋")
	private BrandApartment brandApartment;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Transient
	public File getBanner() {
		return banner;
	}

	public void setBanner(File banner) {
		this.banner = banner;
	}

	@Transient
	public String getBannerContentType() {
		return bannerContentType;
	}

	public void setBannerContentType(String bannerContentType) {
		this.bannerContentType = bannerContentType;
	}

	public String getBannerFileName() {
		return bannerFileName;
	}

	public void setBannerFileName(String bannerFileName) {
		this.bannerFileName = bannerFileName;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public BrandApartment getBrandApartment() {
		return brandApartment;
	}

	public void setBrandApartment(BrandApartment brandApartment) {
		this.brandApartment = brandApartment;
	}
	
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

}
